<?php use Common\Url;
if(!defined('SITE')) exit('Access Denied');?>
<!DOCTYPE html>
<html id="html">
<head>
<meta charset="utf-8" />
<title></title>
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<script type="text/javascript" src="<?php echo Url::getUrl('/Js/jquery-1.11.2.min.js')?>"></script>
<link rel="stylesheet" type="text/css" href="<?php echo Url::getUrl('/Css/bootstrap/css/bootstrap.min.css')?>">
<link rel="stylesheet" type="text/css" href="<?php echo Url::getUrl('/Css/public.css')?>">
<script type="text/javascript">
$(function(){
	
});
</script>
<style type="text/css">
a {
	color:#000;
}
#top-wrap {
	width:100%;
	height:45px;
	line-height:45px;
	background:#333;
	color:#fff;
	margin:0 0 10px 0;
}
#top-wrap a {
	color:#fff;
}
.wrap {
	width:960px;
	margin:0 auto;
}
#top-wrap div.logo {
	width:100px;
	float:left;
}
#top-wrap div.login {
	float:right;
}
#top-wrap div.logo a {
	display:block;
	line-height:45px;
	font-size:12px;
}
#top-wrap div.logo a:hover {
	text-decoration:none;
}
#ad {
	height:100px;
	background:pink;
	margin-bottom:10px;
}
#nav-wrap {
	width:100%;
	height:47px;
	border-top: 2px #f34540 solid;
    border-bottom: 1px #eee solid;
    line-height:47px;
}
#nav-wrap div.nav ul li {
	float:left;
	padding:0 30px;
    background:url(Images/sprite_icon0813_v1.png) no-repeat 100% -53px;
}
#nav-wrap div.nav ul li a {
	
	font-size:16px;
}
#nav-wrap div.nav ul li:first-child {
	padding-left:0;
}
#nav-wrap div.nav ul li:last-child {
	padding-right:0;
}
#main {
	margin-top:35px;
}
#main #news {
	width:600px;
	float:left;
}
#main #news h2 {
	height:50px;
	font-weight:bold;
}
#main #news ul.top_news {
	margin-bottom:20px;
}
#main #news ul.top_news a {
	font-size:18px;
}
#main #news ul.top_news li {
	height:38px;
	line-height:38px;
	color:#ddd;
}
#main #news div.ad-1 {
	width:100%;
	height:50px;
	background:pink;
}
#main #news div.slide-wrap {
	margin: 29px 0 0 0;
}

#main #news div.slide-wrap h2 {
	height:49px;
	font-size: 20px;
	line-height:40px;
	border-top:1px #eee solid;
}
#main #news div.slide-wrap div.slide {
	width:600px;
	height:250px;
	background:pink;
}
#main #news div.list-wrap {
	margin-top:35px;
	border-top:1px solid #f04343;
	padding:10px 0 0 0;
}
#main #news div.list-wrap>ul.article-list>li>a.litpic {
	width:140px;
	height:88px;
	float:left;
}
#main #news div.list-wrap>ul.article-list>li>div.text-wrap {
	width:445px;
	float:right;
}
#main #news div.list-wrap>ul.article-list>li div.text-wrap h3 {
	height:60px;
	font-size:20px;
	padding-bottom:14px; 
	line-height:26px;
}
#main #news div.list-wrap>ul.article-list>li div.text-wrap span.time,#main #news div.list-wrap>ul>li div.text-wrap span.recommend a {
	color:#bbb;
}
#main #news div.list-wrap>ul.article-list>li div.text-wrap span.recommend {
	float:right;
	margin-right:25px;
}
#main #news div.list-wrap>ul.article-list>li {
	padding:15px 0;
	border-bottom: 1px solid #eee;
}
#main #sidebar {
	width:300px;
	float:right;
}
#main #sidebar div.hot-wrap {
	margin:35px 0 0 0;
}
#main #sidebar div.hot-wrap h2 {
	font-size:16px;
	font-weight:bold;
	border-top:1px solid #ddd;
	padding:15px 0;
}
#main #sidebar div.hot-wrap ul li {
	font-size:14px;
	line-height:30px;
}
#main #sidebar div.hot-wrap ul li span.number {
	font-size:22px;
	width:27px;
	display:block;
	float:left;
	margin-left:5px;
	color:#888;
}
#main #sidebar div.hot-wrap ul li a {
	float:left;
}
#main #sidebar div.hot-wrap ul li span.recommend {
	float:right;
	margin-right:5px;
}
#bottom-wrap {
	background:#333;
	color:#ddd;
	margin-top:35px;
}
#bottom-wrap ul {
	line-height:39px;
    height:39px;
    margin:0 -10px;
}
#bottom-wrap ul li {
	float:left;
}
#bottom-wrap ul li a {
	color:#ddd;
	margin:0 10px;
}
</style>
</head>
<body>
<div id="top-wrap">
	<div class="wrap">
		<div class="logo">
			<h1><a href="">私房库新闻</a></h1>
		</div>
		<div class="login">
			登录、待做
		</div>
	</div>
</div>
<div id="ad" class="wrap">
	广告
</div>
<div id="nav-wrap">
	<div class="wrap nav">
		<ul>
			<?php 
			foreach ($this->getData('nav') as $val){
			?>
			<li><a href='<?php echo Url::getUrl(array(M=>'type','uname'=>$val['uname']))?>'><?php echo $val['name']?></a></li>
			<?php 
			}
			?>
		</ul>
	</div>
</div>
<div id="main" class="wrap">
	<div id="news">
		<?php 
		if(count($this->getData('h'))){
		?>
		<h2><a href="<?php echo Url::getUrl(array(M=>'article','uname'=>$this->getData('h')[0]['uname'],'pubdate'=>$this->getData('h')[0]['pubdate'],'id'=>$this->getData('h')[0]['id']))?>"><?php echo $this->getData('h')[0]['title']?></a></h2>
		<?php 
		}
		?>
		<ul class="top_news">
			<?php 
			$lis='';
			if(count($this->getData('a'))){
				foreach ($this->getData('a') as $key=>$val){
					//偶数
					if($key%2==0){
						$lis.="<li><a href='".Url::getUrl(array(M=>'article','uname'=>$val['uname'],'pubdate'=>$val['pubdate'],'id'=>$val['id']))."'>{$val['title']}</a>&nbsp;&nbsp;&nbsp;&nbsp;";
					}else{//奇数
						$lis.="|&nbsp;&nbsp;&nbsp;&nbsp;<a href='".Url::getUrl(array(M=>'article','uname'=>$val['uname'],'pubdate'=>$val['pubdate'],'id'=>$val['id']))."'>{$val['title']}</a></li>";
					}
				}
				$lis=rtrim($lis,'</li>').'</li>';
			}
			echo $lis;
			?>
		</ul>
		<div class="ad-1"></div>
		<div class="slide-wrap">
			<h2>推荐</h2>
			<div class="slide">
				<img src="/News/Images/dwq.jpg" />
			</div>
		</div>
		<div class="list-wrap">
			<ul class="article-list">
				<?php 
				foreach ($this->getData('c') as $val){
				?>
				<li>
					<a class="litpic" href="<?php echo Url::getUrl(array(M=>'article','uname'=>$val['uname'],'pubdate'=>$val['pubdate'],'id'=>$val['id']))?>"><img src="/News/Images/litpic.jpg" /></a>
					<div class="text-wrap">
						<h3><a href="<?php echo Url::getUrl(array(M=>'article','uname'=>$val['uname'],'pubdate'=>$val['pubdate'],'id'=>$val['id']))?>"><?php echo $val['title']?></a></h3>
						<span class="time">3小时前</span>
						<span class="recommend"><a class="" href="#">评论</a></span>
					</div>
					<div style="clear:both;"></div>
				</li>
				<?php 
				}
				?>
			</ul>
		</div>
	</div>
	<div id="sidebar">
		<div class="slide-min-wrap">
			<img src="/News/Images/dwqdqwdq.jpg" />
		</div>
		<div class="hot-wrap">
			<h2>热点排行</h2>
			<ul>
				<li>
					<span class="number">1</span>
					<a href="#">热点排行</a>
					<span class="recommend">177846</span>
					<div style="clear:both;"></div>
				</li>
				<li>
					<span class="number">2</span>
					<a href="#">热点排行</a>
					<span class="recommend">177846</span>
					<div style="clear:both;"></div>
				</li>
				<li>
					<span class="number">3</span>
					<a href="#">热点排行</a>
					<span class="recommend">177846</span>
					<div style="clear:both;"></div>
				</li>
				<li>
					<span class="number">4</span>
					<a href="#">热点排行</a>
					<span class="recommend">177846</span>
					<div style="clear:both;"></div>
				</li>
				<li>
					<span class="number">5</span>
					<a href="#">热点排行</a>
					<span class="recommend">177846</span>
					<div style="clear:both;"></div>
				</li>
				<li>
					<span class="number">6</span>
					<a href="#">热点排行</a>
					<span class="recommend">177846</span>
					<div style="clear:both;"></div>
				</li>
				<li>
					<span class="number">7</span>
					<a href="#">热点排行</a>
					<span class="recommend">177846</span>
					<div style="clear:both;"></div>
				</li>
				<li>
					<span class="number">8</span>
					<a href="#">热点排行</a>
					<span class="recommend">177846</span>
					<div style="clear:both;"></div>
				</li>
				<li>
					<span class="number">9</span>
					<a href="#">热点排行</a>
					<span class="recommend">177846</span>
					<div style="clear:both;"></div>
				</li>
			</ul>
		</div>
	</div>
</div>
<div style="clear:both;"></div>
<div id="bottom-wrap">
	<div class="wrap">
		<ul>
			<li>
				<a href="#">关于我们</a>|
			</li>
			<li>
				<a href="#">关于我们</a>|
			</li>
			<li>
				<a href="#">关于我们</a>|
			</li>
			<li>
				<a href="#">关于我们</a>
			</li>
		</ul>
	</div>
</div>
</body>
</html>